package com.bluefox.hospital.repository;

import com.bluefox.hospital.model.Doctor;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;

/**
 * DoctorRepository
 */
public interface DoctorRepository extends  JpaRepository<Doctor, Long> {

    /**
     * 根据 departmentId 分页查询Doctor
     * @param departmentId
     * @param pageable
     * @return Optional<Doctor>
     */
    Page<Doctor> findByDepartmentId(Long departmentId, Pageable pageable);

}
